home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Technotools
/
Technotools (Chestnut CD-ROM)(1993).ISO
/
batch
/
bbb_v21
/
bbb.doc
< prev
next >
Wrap
Text File
|
1991-11-25
|
7KB
|
201 lines
-- BBB v2.1 --
Brent's Batch Beautifier
(c) 1991 Brent Ashley
With Brent's Batch Beautifier you can bemuse your buddies or
boggle your beau or boss with beautiful batches that simply
bulge with brilliance. In conjunction with Brent's Environment
Tools (BET), you can create some REALLY powerful batches that
usually wouldn't be possible without a high-level compiled
language.
Full source is now included for those who are interested.
Microsoft QuickBASIC v 4.0 or later and Crescent Software's
PDQ version 2.16 or later are required to recompile the source.
BBB sends screen control codes to your ANSI-compatible console
driver, thereby simplifying the process of making your batch files
attractive and colorful. The commands supported by BBB allow:
o Testing for ANSI-compatible console driver
o Cursor position saving, restoring and setting
o Display color and attribute setting
o Screen mode changes
o Box drawing with choice of fill and border
o Text display and string repeating
o Speaker beep and alarm
o Time, date, day of week
o Gas gauge meter
o Timed pause
o Keyboard input, flush, and stuffing
o DOS Environment editing
o Warm and cold reboot
o PrintScreen enable/disable
Most commands have both long and short forms, and commands can be
stacked in either or both forms to the end of the command line
(128 characters). Each command is listed below with its short
form and syntax. BBB examples can be found in DEMO.BAT.
NOTE: Remember to have an ANSI-compatible screen driver loaded in
your CONFIG.SYS file!
Display Attributes:
-------------------
BOLD/!
- Sets hi-intensity ON
UNDERLINE/_
- Sets underline ON (monochrome adapter only)
BLINK/;
- Sets flashing characters ON
REVERSE/*
- Sets color to black on white
RESET/^
- Resets all display attributes and sets color to white on black
COLOR/C Fore Back
- Sets color to Fore on Back
- choices for Fore and Back are:
BLACK/0 RED/1 GREEN/2 YELLOW/3 BLUE/4 MAGENTA/5 CYAN/6 WHITE/7
Cursor and Screen Control:
--------------------------
CLEAR/#
- clears screen to current color and positions cursor at top left
CLREOL/)
- clears to current color from cursor position to end of line
- cursor remains at current position
SAVE/{
- saves current cursor position
RESTORE/}
- returns cursor to saved position
LOCATE/@ Row Col
- Places cursor at position specified by Row and Col
MODE/M Mode
- Changes screen mode (color/mono, 40/80 columns)
- choices for Mode are: M40 M80 C40 C80
Text, String Output:
--------------------
SAY/? all text up to tilde~
- displays text from first non-space character to tilde(~) at
current cursor position and updates cursor position
STRING/$ string up to tilde~ Repeats
- displays string number of times specified by Repeats
BOX/B Top Lft Bot Rgt Fill Border [CharNum]
- saves cursor position, draws box from Top Lft to Bot Rgt, filled
or empty, with specified border and returns cursor to original
position.
- Choices for Fill are: FILL/F EMPTY/E
- Choices for Border are: SINGLE/S DOUBLE/D BLOCK/B or CHAR/C nnn
- you must use a 3-digit number for nnn
GAUGE/G Percent
- displays 50-char shaded gas gauge bar filled to Percent level
ENTER/E
- outputs a Carriage Return to the console (all other string commands
leave cursor at end of string without advancing to the next line)
TIME/T
- displays time on format hh:mm:ss
DATE/D
- displays date in format mm-dd-yy
Interactive features and Misc:
------------------------------
ANSITEST
- reports if ANSI.SYS is loaded. The ANSI-detect routine is run
whenever BBB is invoked and returns DOS errorlevel 255 if ANSI is
NOT available. This command simply displays verification of ANSI
availability. There is no short form for the ANSITEST command.
- execution ends at ANSITEST command - remaining command line ignored.
BOOT [COLD]
- reboots machine. Warm boot unless COLD is specified.
- there is no short form for the BOOT command or its COLD parameter.
- execution ends at BOOT command - remaining command line ignored.
PAUSE/P Seconds
- if Seconds=0 waits until any key is pressed
FLUSH/F
- flushes keyboard buffer of pending keystrokes
STUFF text up tilde~ (&=Return)
- stuffs the specified text into the keyboard buffer to be retrieved
by the next program (or DOS) that asks for input. Any ampersand
(&) characters in the string are replaced with carriage returns
before stuffing.
BEEP/+
- sounds speaker
ALARM/A Repeats
- sounds three-note alarm number of times specified by Repeats
- if Repeats=0 then sounds alarm until key is pressed
WEEKDAY/W
- returns day of week as ERRORLEVEL (great for backup batches!)
- 0 = Sunday ... 6 = Saturday
- execution ends at WEEKDAY command - remaining command line ignored
INPUT/I EnvironmentVariableName
- waits for user to input a string terminated by [ENTER] and assigns
string to the DOS environment variable specified
- *NOTE*: if not enough environment space exists to allocate the
variable, the variable will not be created and the error message
"BBB - not enough DOS environment space" will be displayed on
screen line 25.
QUERY/Q ValidString
- waits for user to press a key in ValidString and returns DOS
ERRORLEVEL==position of key in string
- beeps if invalid key pressed
- execution ends at QUERY command - remaining command line ignored
UPCASE/U EnvironmentVariableName
- forces environment variable to uppercase for easier comparisons
PRTSCR ON/OFF
- Enables or disables PrintScreen key.
-- Revision History --
1.0 - first release - 5 Aug 1991
1.1 - add INPUT, ALARM, FLUSH, WEEKDAY, UPCASE
1.2 - add ANSITEST and test for ANSI.SYS in init code, BOOT
2.0 - add cold boot, STUFF, PRTSCR
- release with Brent's Environment Tools v1.0
2.1 - compiled with PDQ v3.0
- add BOX CHAR nnn
- release source free with package
-- Note --
BBB and BET are distributed as Freeware. This means that while anyone can
use them at no cost in a personal, business, or government environment, I
retain the copyright.
Both programs were written in Microsoft QuickBASIC and linked with
Crescent Software's PDQ link library.
Brent Ashley
8 Darnock Court
Brampton, Ontario
L6Z 2X3
CANADA